package cn.ysnk.clz.entity.menu;

import java.util.List;

import com.jfinal.plugin.activerecord.Model;

import cn.ysnk.clz.config.annotation.EntityAnnotation;


@EntityAnnotation(tableName="clz_menu")
public class AdminMenu extends Model<AdminMenu>{
	public static final AdminMenu adminMenuDao = new AdminMenu();
	
	public List<AdminMenu> findAllMenu(){
		return adminMenuDao.find("select * from clz_menu order by sort");
	}
	
	public List<AdminSubMenu> getSubMenu(){
		return AdminSubMenu.adminSubMenuDao.findSubMenuByParentMenuId((String)get("id"));
	}
}
